home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / csounds / whooper.c < prev   
Text File  |  1988-08-17  |  303b  |  23 lines

  1. #define FALSE 0
  2. #define TRUE 1
  3.  
  4. void whooper()
  5. {
  6.  
  7.   int  freq;
  8.   int  done = FALSE;
  9.  
  10.   do {
  11.     for (freq = 900; freq <= 1000; freq++) {
  12.       sound(freq);
  13.       delay(2);
  14.       if (kbhit()) {
  15.         done = TRUE;
  16.         break;
  17.       }
  18.     }
  19.   } while (!(done));
  20.   nosound();
  21. }
  22.  
  23.